package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func main(){
	engine := gin.Default()
	engine.GET("/json", func(c *gin.Context) {
		c.JSON(http.StatusOK,gin.H{
			"name" : "张三",
			"age" : "24",
		})
	})
	engine.GET("/xml", func(c *gin.Context) {
		c.XML(http.StatusOK, gin.H{
			"name" : "张三",
			"age" : "24",
		})
	})
	engine.Run(":8088")

}
